# @Time    :2025/3/25 8:32
"""
题目2：列表操作
使用for 循环的嵌套，打印如下图形的*【等腰三角形】
"""
n = 5
for i in range(1, n + 1):
    print(" " * (n - i) + "*" * (i * 2 - 1))


n=5
for i in range(1, n+1):
    for c in range(0, n-i):
        print(" " , end="")  # 打印不换行
    print("*" * (i * 2 - 1))


# a = [1, 3, 5, 7, 9]
# b = 4
# for i in range(0, 1):
#     for j in a:
#         print(" " * b + "*" * j)
#         b -= 1
#
# for i in range(0, 5):
#     xi = "x" * (2 * i + 1)
#     print(f"{xi:^9}")
